package com.tshopping.controller;

import com.tshopping.service.OrderDetailsService;
import com.tshopping.util.ResponseData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @name: OrderDetailsController
 * @description: 订单详情页面控制器
 * @author: Jackeys
 * @date: 2021-01-31 09:56
 */
@RestController
@RequestMapping("/OrderDetailsController")
@CrossOrigin
public class OrderDetailsController {

    @Autowired
    private OrderDetailsService orderDetailsService;

    @PostMapping(value = "/getOrderDetailsList")
    /**
     * @description 获取订单详情
     * @Param: order
     * @return ResponseData
     * @author Jackeys
     * @date 2021-01-31 09:58
     */
    public ResponseData getOrderDetailsList(int order,int address){
        return orderDetailsService.getOrderDetails(order,address);
    }
}
